Optimal. Leaf size=35 \[ \frac {1}{\sqrt {a \sec ^2(x)}}-\frac {\tanh ^{-1}\left (\frac {\sqrt {a \sec ^2(x)}}{\sqrt {a}}\right )}{\sqrt {a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3657, 4124, 51, 63, 207} \[ \frac {1}{\sqrt {a \sec ^2(x)}}-\frac {\tanh ^{-1}\left (\frac {\sqrt {a \sec ^2(x)}}{\sqrt {a}}\right )}{\sqrt {a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 51
Rule 63
Rule 207
Rule 3657
Rule 4124
Rubi steps
\begin {align*} \int \frac {\cot (x)}{\sqrt {a+a \tan ^2(x)}} \, dx &=\int \frac {\cot (x)}{\sqrt {a \sec ^2(x)}} \, dx\\ &=\frac {1}{2} a \operatorname {Subst}\left (\int \frac {1}{(-1+x) (a x)^{3/2}} \, dx,x,\sec ^2(x)\right )\\ &=\frac {1}{\sqrt {a \sec ^2(x)}}+\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a x}} \, dx,x,\sec ^2(x)\right )\\ &=\frac {1}{\sqrt {a \sec ^2(x)}}+\frac {\operatorname {Subst}\left (\int \frac {1}{-1+\frac {x^2}{a}} \, dx,x,\sqrt {a \sec ^2(x)}\right )}{a}\\ &=-\frac {\tanh ^{-1}\left (\frac {\sqrt {a \sec ^2(x)}}{\sqrt {a}}\right )}{\sqrt {a}}+\frac {1}{\sqrt {a \sec ^2(x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 32, normalized size = 0.91 \[ \frac {\sec (x) \left (\cos (x)+\log \left (\sin \left (\frac {x}{2}\right )\right )-\log \left (\cos \left (\frac {x}{2}\right )\right )\right )}{\sqrt {a \sec ^2(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.44, size = 66, normalized size = 1.89 \[ \frac {{\left (\tan \relax (x)^{2} + 1\right )} \sqrt {a} \log \left (\frac {a \tan \relax (x)^{2} - 2 \, \sqrt {a \tan \relax (x)^{2} + a} \sqrt {a} + 2 \, a}{\tan \relax (x)^{2}}\right ) + 2 \, \sqrt {a \tan \relax (x)^{2} + a}}{2 \, {\left (a \tan \relax (x)^{2} + a\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.35, size = 34, normalized size = 0.97 \[ \frac {\arctan \left (\frac {\sqrt {a \tan \relax (x)^{2} + a}}{\sqrt {-a}}\right )}{\sqrt {-a}} + \frac {1}{\sqrt {a \tan \relax (x)^{2} + a}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.62, size = 29, normalized size = 0.83 \[ \frac {\cos \relax (x )+\ln \left (-\frac {-1+\cos \relax (x )}{\sin \relax (x )}\right )+1}{\sqrt {\frac {a}{\cos \relax (x )^{2}}}\, \cos \relax (x )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.90, size = 42, normalized size = 1.20 \[ \frac {2 \, \cos \relax (x) - \log \left (\cos \relax (x)^{2} + \sin \relax (x)^{2} + 2 \, \cos \relax (x) + 1\right ) + \log \left (\cos \relax (x)^{2} + \sin \relax (x)^{2} - 2 \, \cos \relax (x) + 1\right )}{2 \, \sqrt {a}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.14, size = 31, normalized size = 0.89 \[ \frac {1}{\sqrt {a\,{\mathrm {tan}\relax (x)}^2+a}}-\frac {\mathrm {atanh}\left (\frac {\sqrt {a\,{\mathrm {tan}\relax (x)}^2+a}}{\sqrt {a}}\right )}{\sqrt {a}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cot {\relax (x )}}{\sqrt {a \left (\tan ^{2}{\relax (x )} + 1\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________